<template>
    <div class="iframe">
        <div class="i-title">
            <h3>slot传参</h3>
        </div>
        <div class="i-tip">
            <child-comp>
                <template #aa>
                    {{ pstu.work }}
                </template>

                <template v-slot:cc>
                    {{ pstu.like }}
                </template>

                <template v-slot:dd="dds">
                    {{ dds.age }}
                </template>

                <!--<template v-slot:dd="dds">
     {{dds.age}}
</template>-->

                <!--<template #dd="ddss">
     {{ddss.age}}
</template>-->

            </child-comp>
        </div>
    </div>
</template>

<script>
import ChildComp from "./ChildComp.vue"
import {
    reactive
} from "vue";
export default {
    components: {
        ChildComp
    },
    setup() {
        let pstu = reactive({
            work: "我一个程序员",
            like: "写代码"
        })
        return {
            pstu
        }
    }
}
</script>

